package com.example.sunmi.View;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.sunmi.Base.BaseActivity;
import com.example.sunmi.Base.BaseApp;
import com.example.sunmi.R;
import com.example.sunmi.Utils.AidlUtil;

public class IDActivity extends BaseActivity implements View.OnClickListener {

    private Button btText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    public int initId() {
        return R.layout.activity_id;
    }

    @Override
    public void initView() {
        btText = (Button) findViewById(R.id.bt_text);

        btText.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_text:
                String name = "我是 你要打印的文字";

                if (baseApp.isAidl()) {
                    AidlUtil.getInstance().printText(name, 24, false, true);
                }
                break;

        }
    }
}
